<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">修改页面</block>
<block name="appendheader">
	<!-- Validform_v5.3.2验证框架 -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Validform/css/Validform_v5.3.2.css"/>
	<script type="text/javascript" src="__PUBLIC__/Validform/js/Validform_v5.3.2_min.js"></script>
	
	<!--编辑器js引入-->
	<script type="text/javascript">
		var UEDITOR_HOME_URL = '__PUBLIC__/ueditor/',ueditor_loader={};
		var MEDIA_OBJID = 'Web/{$Think.cookie.webid}{$Think.config.UEDITOR_PATH}';
	</script>
	<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script> 
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-2000").addClass('active');	//选中父菜单
			$("#WebMenu-2009").addClass('active');	//选中当前菜单
		});
		$(function() {
			var editor;
			var myform=$("#myform").Validform({
				tiptype:3,
				label:".label",
				showAllError:true,
				postonce:true,//开启二次提交防御
				ajaxPost:false,
				beforeSubmit:function(curform) {
					//在验证成功后，表单提交前执行的函数，curform参数是当前表单对象。
					lockScreen();
				},
				callback:function(data){
					$.Hidemsg();
				}
			});
			myform.addRule([{
				ele:"#seq",
				datatype:"*1-20",
				nullmsg:"请输入问卷序号"
			},
			{
				ele:"#title",
				datatype:"*1-100",
				nullmsg:"请输入页面名称"
			}]);
		});
	</script>
</block>
<!-- 当前位置 -->
<block name="breadcrumb">
	<div class="page-header pull-left">
		<div class="page-title">修改页面</div>
	</div>
	<ol class="breadcrumb page-breadcrumb pull-left">
		<li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="__APP__?g=Admin&m=Page&a=index">基础数据</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li class="active">修改页面</li>
	</ol>
</block>
<block name="main_content">
		<div class="row">
		<div class="col-md-12">
			<div class="panel panel-blue">
				<div class="panel-heading">添加问卷</div>
				<div class="panel-body pan">
					<form id="myform" name="myform" action="__APP__?g=Admin&m=Form&a=update" method="post" class="form-horizontal form-seperated">
						<div class="form-body">
						    <div class="form-group">
								<label for="seq" class="col-md-2 control-label">显示序号  <span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="seq" name="seq" class="form-control" value="{$data.seq}" />
								</div>
							</div>
							
							<div class="form-group">
								<label for="name" class="col-md-2 control-label">问卷名称 <span class='require'>*</span></label>
								<div class="col-md-7"> 
									<input type="text" id="title" name="title" class="form-control" value="{$data.title}" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">问卷简介</label>
								<div class="col-md-8" >
									<textarea id="intro" name="intro">{$data.intro}</textarea>
									<script type="text/javascript">
									    UE.getEditor('intro');
									</script>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">状态 <span class='require'>*</span></label>
								<div class="col-md-7">
									<div class="radio">
										<volist name="status_list" id="vo">
											<label class="radio-inline"><input type="radio" name="status" value="{$vo.id}" <eq name="data.status" value="$vo.id">checked</eq> />&nbsp;{$vo.name} </label>
										</volist>
									</div>
								</div>
							</div>
						</div>
						<div class="form-actions text-left">
							<div class="col-md-offset-2 col-md-7">
							    <input type="hidden" name="id" value="{$data.id}" />
								<button type="submit" class="btn btn-primary">提交</button>&nbsp;&nbsp;
								<button type="button" class="btn btn-green" onclick="history.go(-1);">取消</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</block>